﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ACC.Data.Entities.Client.Entities
{
    public class ClientDeviceConfig
    {
        public virtual string DeviceName { get; set; }
        public virtual string DeviceDescription { get; set; }
        /// <summary>
        /// 设备类型，和ACC里Driver的配置一致
        /// ACCCOMM, DT4000, MC3000, DIO, Cognex, ViewTraka
        /// OPC, OPCUA, Fanuc, Atlas, 马头, PanaCIM
        /// SIEMENS, AB, Mitsubishi, Omron, Backoff, Keyence, Modbus, Gootech
        /// </summary>
        public virtual string DeviceType { get; set; }
        /// <summary>
        /// IP 地址
        /// </summary>
        public virtual string DeviceAddress { get; set; }
        /// <summary>
        /// 设备参数，和ACC Device的配置一致
        /// </summary>
        public virtual string DeviceParameter { get; set; }
        /// <summary>
        /// 同一个PLC多个站的情况下指定第几个站
        /// </summary>
        public virtual int StationIndex { get; set; }

        /// <summary>
        /// 不同PLC 的其他参数
        /// 通用
        ///         LoadBarcodeCount
        ///         BarcodeLength
        ///         UnloadBarcodeCount
        ///         NextStepBarcodeCount
        ///         NeedNextStepPartTypeID
        ///         FixedBarcodePos
        ///         NeedCheckSum
        ///         FullYear
        ///         NeedSendTime
        ///         NeedSendHeartBeat
        /// Siemens: 
        ///         DB190, DB190_Offset, 
        ///         DB191, DB191_Offset,
        ///         DB192, DB192_PLC_Offset, DB192_ACC_Offset
        ///         DB192, DB193_PLC_Offset, DB193_ACC_Offset
        ///         DB192, DB194_PLC_Offset, DB194_ACC_Offset
        ///         DB195, DB195_Offset,  (Audit)
        ///         DB196, DB196_Offset,  (Time)
        ///         DB197, DB197_PLC_Offset, DB197_ACC_Offset  (Fault & Warning)
        ///         DB198, DB198_PLC_Offset, DB198_ACC_Offset  (NextStep)
        ///         BarcodeLength
        ///         ErrorMsgLength
        ///         PartTypeDescLength
        ///         PartTypeDataIntLength， PartTypeDataRealLength， PartTypeDataStringLength， PartTypeDataStringDataLength
        ///         ProcessDataRealLength， ProcessDataStringLength， ProcessDataStringDataLength
        ///         AuditDataRealLength 
        /// AB: 
        ///         Tag_Prefix, PLCTag_Index
        /// Keyence: 
        ///         Addr_COMM_Offset, 
        ///         Addr_PARTTYPE_Offset, 
        ///         Addr_PARTDATA_ACC_Offset, Addr_PARTDATA_PLC_Offset,
        ///         Addr_LOAD_ACC_Offset, Addr_LOAD_PLC_Offset, 
        ///         Addr_UNLOAD_PLC_Offset, 
        ///         Addr_NEXTSTEP_ACC_Offset, Addr_NEXTSTEP_PLC_Offset,
        ///         Addr_TIME_Offset, 
        ///         Addr_AUDIT_Offset,
        ///         Addr_MACHINE_ACC_Offset, Addr_MACHINE_PLC_Offset
        ///         BarcodeLength
        ///         PartTypeDescLength
        ///         ErrorMsgLength
        ///         PartTypeDataIntLength, PartTypeDataRealLength, PartTypeDataStringLength, PartTypeDataStringDataLength
        ///         ProcessDataRealLength, ProcessDataStringLength, ProcessDataStringDataLength
        ///         AuditDataRealLength
        /// Omron: 
        ///         Addr_COMM_Offset, 
        ///         Addr_PARTTYPE_Offset,
        ///         Addr_PARTDATA_ACC_Offset, Addr_PARTDATA_PLC_Offset
        ///         Addr_LOAD_ACC_Offset, Addr_LOAD_PLC_Offset
        ///         Addr_UNLOAD_ACC_Offset, Addr_UNLOAD_PLC_Offset
        ///         Addr_AUDIT_Offset
        ///         Addr_TIME_Offset
        ///         BarcodeLength
        ///         PartTypeDescLength
        ///         ErrorMsgLength
        ///         Addr_NEXTSTEP_ACC_Offset, Addr_NEXTSTEP_PLC_Offset
        ///         Addr_MACHINE_ACC_Offset, Addr_MACHINE_PLC_Offset
        ///         PartTypeDataIntLength, PartTypeDataRealLength, PartTypeDataStringLength, PartTypeDataStringDataLength
        ///         ProcessDataRealLength, ProcessDataStringLength, ProcessDataStringDataLength
        ///         AuditDataRealLength
        /// Mitsubishi: 
        ///         D3000 COMM
        ///         D3010 Time
        ///         D3100 PartType List
        ///         D3700 PartType Data
        ///         D4000 Load
        ///         D4200 Unload
        ///         BarcodeLength
        ///         ErrorMsgLength
        ///         PartTypeListStringLength
        ///         PartTypeDataRealLength
        ///         ProcessDataRealLength
        /// </summary>
        public Dictionary<string, string> PLCVariables { get; set; }

    }
}
